import request from '@/utils/request';

export function nowDoTask(id){
  return request({
    url:"/dormitory/task/nowDoTask/"+id,
    method:"POST"
  });
}

export function listStuTask(stuNo){
  return request({
    url:"/dormitory/task/listStuTask/"+stuNo,
    method:"GET"
  });
}

export function listOwnTask(){
  return request({
    url:"/dormitory/task/listOwnTask",
    method: 'get',
  });
}

// 查询宿舍调整任务列表
export function listTask(query) {
  return request({
    url: '/dormitory/task/list',
    method: 'get',
    params: query
  })
}

// 查询宿舍调整任务详细
export function getTask(id) {
  return request({
    url: '/dormitory/task/' + id,
    method: 'get'
  })
}

// 新增宿舍调整任务
export function addTask(data) {
  return request({
    url: '/dormitory/task/add',
    method: 'post',
    data: data
  })
}

// 修改宿舍调整任务
export function updateTask(data) {
  return request({
    url: '/dormitory/task/update',
    method: 'post',
    data: data
  })
}

// 删除宿舍调整任务
export function delTask(id) {
  return request({
    url: '/dormitory/task/' + id,
    method: 'post'
  })
}
